<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/workbusiness/INTE_WAREHOUSE.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/system/workbusiness/INTE_WAREHOUSE.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'Id',
                footer: "Foots",
                cnName: '仓库信息',
                name: 'workbusiness/INTE_WAREHOUSE',
                url: "/INTE_WAREHOUSE/",
                sortName: "CreateOn"
            });
            const editFormFields = ref({"WarehouseCode":"","WarehouseNameZH":"","WorkCenterId":"","Type":""});
            const editFormOptions = ref([[{"title":"编码","field":"WarehouseCode","type":"text"},
                               {"title":"名称","field":"WarehouseNameZH","type":"text"},
                               {"dataKey":"工作中心","data":[],"title":"工作中心","field":"WorkCenterId","type":"select"},
                               {"dataKey":"仓库类型","data":[],"title":"类型","field":"Type","type":"select"}]]);
            const searchFormFields = ref({"WarehouseCode":"","WarehouseNameZH":"","WorkCenterId":"","Type":""});
            const searchFormOptions = ref([[{"title":"编码","field":"WarehouseCode","type":"like"},{"title":"名称","field":"WarehouseNameZH","type":"like"},{"dataKey":"工作中心","data":[],"title":"工作中心","field":"WorkCenterId","type":"select"},{"dataKey":"仓库类型","data":[],"title":"类型","field":"Type","type":"select"}]]);
            const columns = ref([{field:'Id',title:'id',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'WarehouseCode',title:'编码',type:'string',width:110,align:'left',sort:true},
                       {field:'WarehouseNameZH',title:'名称',type:'string',width:110,align:'left'},
                       {field:'WorkCenterId',title:'工作中心',type:'string',bind:{ key:'工作中心',data:[]},width:110,align:'left'},
                       {field:'Type',title:'类型',type:'string',bind:{ key:'仓库类型',data:[]},width:110,align:'left'},
                       {field:'IsWMS',title:'是否立库',type:'string',width:110,align:'left'},
                       {field:'Description',title:'描述',type:'string',width:110,align:'left'},
                       {field:'Status',title:'状态',type:'string',width:110,hidden:true,align:'left'},
                       {field:'CreateBy',title:'创建人',type:'string',width:110,hidden:true,align:'left'},
                       {field:'CreateOn',title:'创建时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'UpdateBy',title:'更新人',type:'string',width:110,hidden:true,align:'left'},
                       {field:'LastUpdateOn',title:'更新时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'IsDeleted',title:'逻辑删除 0/不删除 1/已删除',type:'bool',width:110,hidden:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
